cmake_minimum_required(VERSION 3.0.2)
project(my_diffbot)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  controller_manager
  hardware_interface
  joint_limits_interface
  transmission_interface
  robot_state_publisher
  urdf
  xacro
  geometry_msgs
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES my_diffbot
  CATKIN_DEPENDS roscpp controller_manager hardware_interface joint_limits_interface transmission_interface robot_state_publisher urdf xacro geometry_msgs
)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

add_library(diffbot_hardware_interface
  src/diffbot_hardware_interface.cpp
)

add_executable(diffbot_control_node src/diffbot_control_node.cpp)
target_link_libraries(diffbot_control_node
  diffbot_hardware_interface
  ${catkin_LIBRARIES}
)

add_executable(teleop_diffbot src/teleop_diffbot.cpp)
target_link_libraries(teleop_diffbot
  ${catkin_LIBRARIES}
)

install(TARGETS diffbot_control_node diffbot_hardware_interface teleop_diffbot
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
